package com.example.util;

import java.text.Collator;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Locale;

/**
 * @Author: lidongyue
 * @Version: 1.0
 * @Date: 2022/6/22-20:25
 * @Description:
 */
public class CommonUtil {

    public void chinaSort(String[] strs) {
        //定义一个中文排序器
        Comparator c = Collator.getInstance(Locale.CHINA);
        //升序排列
        Arrays.sort(strs, c);
    }
}
